<?php
	if (is_admin())
		add_action("admin_menu", "setup_theme_admin_menus");
	function setup_theme_admin_menus()
	{
        // Parent menu
		add_menu_page('General Settings', 'CouponX settings', 'manage_options', 'cpx_theme_setting',
			'theme_settings_page');
        // Childs menu
		add_submenu_page('cpx_theme_setting', 'Right Now', 'Right Now', 'manage_options',
    				'cpx-right-now', 'right_now');
		add_submenu_page('cpx_theme_setting', 'Social settings', 'Social settings', 'manage_options',
					'front-page-elements', 'social_settings');
        add_submenu_page('cpx_theme_setting', 'Pagination post', 'Pagination setting', 'manage_options',
					'pagination-setting', 'pagination_settings');
        add_submenu_page('cpx_theme_setting', 'Following Emails', 'Following Emails', 'manage_options',
					'following-emails', 'following_emails');
        add_submenu_page('cpx_theme_setting', 'Customers Contact', 'Customers Contact', 'manage_options',
					'customer-contact', 'customer_contact');
        add_submenu_page('cpx_theme_setting', 'Email Action', 'Email Action', 'manage_options',
					'email-action', 'email_action');
	}
    function social_settings()
    {
        include('setting-page/social_settings.php');
    }
	function theme_settings_page()
	{
		include('setting-page/theme_setting.php');
    }
    function pagination_settings()
    {
        include('setting-page/pagination_settings.php');
    }
    function following_emails()
    {
        include('setting-page/following_emails.php');
    }
	function right_now()
    {
        include('setting-page/rightnow.php');
    }
    function customer_contact()
    {
        include('setting-page/customer_contact.php');
    }
    function email_action()
    {
        include('setting-page/send_email.php');
    }
?>